package UML;
public class Thoroughbred {
    // 私有属性
    private Thoroughbred mother;
    private Thoroughbred father;
    private int birthyear;

    // 构造方法
    public Thoroughbred(Thoroughbred mother, Thoroughbred father, int birthyear) {
        this.mother = mother;
        this.father = father;
        this.birthyear = birthyear;
    }

    // 获取当前年龄的方法
    public int getCurrentAge() {
        int currentYear = 2024;
        return currentYear - birthyear;
    }

    // 获取父亲的方法
    public Thoroughbred getFather() {
        return father;
    }

    // 获取母亲的方法
    public Thoroughbred getMother() {
        return mother;
    }
}